package com.example.mobile2032021606170hsy0608;

import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.Toolbar;


import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    private Toolbar toolbar;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        HttpUtil.asyncRequest(new HttpUtil.AsyncCallBack() {
            public void onFailure(Exception e) {
            }

            public void onResponse(String json) {
                Toast.makeText(MainActivity.this, json, Toast.LENGTH_SHORT).show();
            }
        }, "get_all_sense", new String[]{"UserName"}, "user1");
        initView();
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setHomeButtonEnabled(true);
    }


    private void initView() {
       toolbar = (Toolbar) findViewById(R.id.toolbar);
    }
}


